﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using WPNEXT.ViewModel;
using System.Diagnostics;

namespace WPNEXT
{
    public partial class ExplodeWallPage : PhoneApplicationPage
    {
        private ExplodeViewModel _explode;

        ~ExplodeWallPage()
        {
            Debug.WriteLine("释放" + this.GetType().ToString());
        }

        public ExplodeWallPage()
        {
            InitializeComponent();
            _explode = this.DataContext as ExplodeViewModel;
        }

        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            _explode.OnNavigatedTo(this, e);
        }

        protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedFrom(e);
            _explode.OnNavigatedFrom(this, e);
        }

        private void GoTo_Click(object sender, RoutedEventArgs e)
        {
            this.NavigationService.Navigate(new Uri("/Views/MyPage.xaml",UriKind.Relative));
        }
    }
}
